<?php
use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this \yii\web\View */
/* @var $content string */

$this->beginContent('@frontend/views/layouts/mkt_common.php')
?>

<!--
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-->
<style>

#friendTab .weui_navbar_item.weui_bar_item_on {
  color:#F53F33;
  border-bottom: 2px solid red;
}
#friendTab .weui_navbar_item.weui_bar_item_on::after {
  border-bottom: 1px solid #F53F33;
}
#friendTab .weui_navbar_item::after {
  border-right: 0px;
}
#friendTab .weui_navbar_item {
  background-color: #ffffff;
  border-right: 0px;
  font-size: 16px;
  padding: 8px 0;
}
#friendTab .weui_panel:after {
    border-bottom: 0px;
}
#friendTab .page{
  padding: 0px;
  min-height: calc(100vh - 95px);
  min-height: -moz-calc(100vh - 95px);
  min-height: -webkit-calc(100vh - 95px);
  background: #ffffff none repeat scroll 0 0;
}

</style>

<div id="friendTab" class="weui_tab">
	<div class="weui_navbar" style="width: 100vw;">
		<div onclick="gotoMyFriend();" class="weui_navbar_item <?php echo yii::$app->controller->action->id == 'self-friend-myfriend' ? 'weui_bar_item_on' : ''; ?>">我的好友</div>

		<div onclick="gotoFriendMsg();" class="weui_navbar_item <?php echo yii::$app->controller->action->id == 'self-friend-message' ? 'weui_bar_item_on' : ''; ?> ">
        <?php if ($this->context->getMe()->getUnreadRecvChatCount()): ?>
        <div class="count" style="left: 50%;margin-left: 25px;height:10px;width:10px;"></div>
        <?php endif; ?>
        好友消息</div>

		<div onclick="gotoFriendApply();" class="weui_navbar_item <?php echo yii::$app->controller->action->id == 'self-friend-apply' ? 'weui_bar_item_on' : ''; ?> ">
        <?php if ($this->context->getMe()->getWaitingAddFriendChatCount()): ?>
        <div class="count" style="left: 50%;margin-left: 25px;height:10px;width:10px;"></div>
        <?php endif; ?>
        好友申请</div>
		<div onclick="gotoFriendAttention();" class="weui_navbar_item <?php echo yii::$app->controller->action->id == 'self-friend-attention' ? 'weui_bar_item_on' : ''; ?> ">关注的人</div>

	</div>
	<div class="weui_tab_bd" style="padding-top: 40px;">
		<div class="weui_tab_bd_item" style="display: block;">
            <?php echo $content ?>
		</div>
	</div>
</div>

<script type="text/javascript">
function gotoMyFriend()
{
	window.location.href="<?php echo Url::to(['wap/self-friend-myfriend']); ?>";
	document.title = '我的好友';
}
function gotoFriendMsg()
{
	window.location.href="<?php echo Url::to(['wap/self-friend-message']); ?>";
	document.title = '好友消息';
}
function gotoFriendApply()
{
	window.location.href="<?php echo Url::to(['wap/self-friend-apply']); ?>";
	document.title = '好友申请';
}
function gotoFriendAttention()
{
	window.location.href="<?php echo Url::to(['wap/self-friend-attention']); ?>";
	document.title = '关注的人';
}
</script>

<?php $this->endContent() ?>